package com.yang.controller.admin;

import com.yang.bean.bj.vo.MarketGoodsVO;
import com.yang.bean.bj.vo.MarketOrdersVO;
import com.yang.bean.bj.vo.MarketUserVO;
import com.yang.bean.common.BaseRespVo;
import com.yang.service.adminimpl.StatServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @description: TOOD
 * @return:
 * @author: BaoZi
 * @date: 2022/9/8
 */
@RestController
@RequestMapping("admin/stat")
public class AdminStatController {

    @Autowired
    StatServiceImpl statService;


    @RequestMapping("user")
    public BaseRespVo user(){
        MarketUserVO marketUserVO = statService.queryUser();
        return BaseRespVo.ok(marketUserVO);
    }

    @RequestMapping("order")
    public BaseRespVo order(){
        MarketOrdersVO marketOrdersVO = statService.queryOrder();
        return BaseRespVo.ok(marketOrdersVO);
    }

    @RequestMapping("goods")
    public BaseRespVo goods(){
        MarketGoodsVO marketGoodsVO = statService.queryGoods();
        return BaseRespVo.ok(marketGoodsVO);
    }


}
